    <template>
    <nav class="nav-subhome">
        <div v-for="(val,key) in funButton"  @click="toUrl(val.tag)" :tag="val.tag">
            <img :src="val.cover" />
            <span>{{val.name}}</span>
        </div>
    </nav>
</template>

<script>
    export default {
        name: "fun-button",
        data(){
          return{
          }
        },
        props:{
            funButton:[]
        },
        methods:{
            toUrl(name,url) {
                switch(name){
                    //签到
                            case 'SIGN':
                                 url='/sign';
                            break;
                   //砍水果
                             case 'CUT_FRUITS':
                              url="/CutZero";
                              break;
                  //砍美妆
                          case 'CUT_BEAUTY':
                              url="/CutZero";
                              break;
                 //砍特产
                          case 'CUT_SPECIALTY':
                              url="/CutZero";
                              break;
                 //砍赚
                          case 'CUT_EARN':
                              url="/home/hotList";
                              break;
                 //砍点意思
                          case 'CUT_MEAN':
                              url="/CutZero";
                              break;
                  //优惠券
                          case 'CUT_COUPON':
                              url="/cutVoucher";
                              break;
                 //砍到8.8
                          case 'CUT_TO_EIGHT':
                              url="/CutZero";
                              break;
                 //砍到0
                          case 'CUT_TO_ZERO':
                              url="/CutZero";
                              break;
                 //砍百货
                          case 'CUT_BX':
                              url="/CutZero";
                              break;
                  //随心砍
                        case 'CUT_RANDOM':
                            url="/cutFree";
                         break;
                  //秒杀
                          case 'SECKILL':
                          url="/killSecond";
                          break;
                 }
                this.$router.push(url+'/'+name)

            }
        },
        mounted(){

        }
    }
</script>

<style scoped>

</style>